package entity;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.stereotype.Component;

/**
 * 用户可以对某条留言信息进行回复
 * @author Administrator
 *
 */
@Component
public class Reply {

	private int id;  //编号
	private Comment comm;  //回复所在的留言
	private Users user;   //此回复所归属者
	private String detail;  //回复内容
	private Date replyTime;  //回复的时间
	private int replyClick;  //此回复的点赞数
	private String formatTime;
	
	public String getFormatTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		formatTime = sdf.format(this.replyTime);
		return formatTime;
	}
	
	public void setFormatTime(String formatTime) {
		this.formatTime = formatTime;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Comment getComm() {
		return comm;
	}
	public void setComm(Comment comm) {
		this.comm = comm;
	}
	public Users getUser() {
		return user;
	}
	public void setUser(Users user) {
		this.user = user;
	}
	public String getDetail() {
		return detail;
	}
	public void setDetail(String detail) {
		this.detail = detail;
	}
	public Date getReplyTime() {
		return replyTime;
	}
	public void setReplyTime(Date replyTime) {
		this.replyTime = replyTime;
	}
	public int getReplyClick() {
		return replyClick;
	}
	public void setReplyClick(int replyClick) {
		this.replyClick = replyClick;
	}
	@Override
	public String toString() {
		return "Reply [id=" + id + ", comm=" + comm + ", user=" + user + ", detail=" + detail + ", replyTime="
				+ replyTime + ", replyClick=" + replyClick + "]";
	}
	
}
